package com.example.cloudindex.web;


import com.example.cloudindex.entity.User;
import com.example.cloudindex.web.impl.OrderActionImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "cloud-order",fallback = OrderActionImpl.class)
public interface IOrderAction {

    @RequestMapping("/order")
    String order();

    @RequestMapping("/user")
    User user(@RequestBody User user);

    @RequestMapping("/add")
    int add(@RequestParam int a,@RequestParam int b);

    @RequestMapping("/hello")
    String hello(@RequestParam String name);
}
